Skip to content

feat: add toBePressed matcher (#203) #658

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 13, 2025

Conversation

kretajak
Copy link
Contributor

What:

New toBePressed matcher is added

Why:

Closes #203

Checklist:

  • Documentation
  • Tests
  • Updated Type Definitions
  • Ready to be merged

In my opinion this PR could be followed by another one which would add support for checking aria-pressed="mixed". Maybe toBePartiallyPressed? It would follow the same approach as splitter toBeChecked and toBePartiallyChecked into two separate matchers.

@kretajak
Copy link
Contributor Author

kretajak commented Feb 21, 2025

Hi, may I ask for reviews?

@kretajak
Copy link
Contributor Author

kretajak commented Aug 9, 2025

Hi @gnapse, can I kindly ask for a review?

Copy link
Member

@gnapse gnapse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making this contribution. It is good stuff. Though there are a couple of things that need to be improved.

(the comments marked as "nit-pick" are not fundamental to be changed, but other ones are)

@kretajak kretajak force-pushed the feat/add-to-be-pressed-matcher branch from 5a89af4 to 2662e5d Compare August 12, 2025 19:11
@gnapse gnapse merged commit cfdf8ae into testing-library:main Aug 13, 2025
12 of 14 checks passed
@gnapse
Copy link
Member

gnapse commented Aug 13, 2025

@all-contributors please add @kretajak for code, test

Copy link
Contributor

@gnapse

I've put up a pull request to add @kretajak! 🎉

Copy link

🎉 This PR is included in version 6.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for matching pressed state of toggle buttons
2 participants